package trigger.utils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Vector;

public class Latest 
{

HashMap<String,Lib>corruent = new HashMap<String,Lib>();	
	
public Latest(String latest)
{
	String[] l = latest.split("\n");
	for(String line:l)
	{
		Lib at = new Lib(line);
		corruent.put(at.getName(), at);
	}
}

public String need(String of,String info)
{
	return	corruent.get(of).getInfo(info);
}

public List<String> getAllNames()
{
    List<String> list = new ArrayList<String>();
    for(Lib lib:corruent.values()){
        list.add(lib.getName());
    }
    return list;
}

public int length()
{
    return corruent.size();
}
	
}
